package org.chen.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.chen.model.elastic.ArticleIndex;
import org.chen.model.mongodb.ArticleDocument;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;
import java.util.Optional;

@Mapper
public interface ArticleElasticsearchRepository extends ElasticsearchRepository<ArticleIndex, String> {
    Page<ArticleIndex> findByAuthor(String author, PageRequest pageRequest);
}
